﻿Imports CodeMatrix.Context
Imports CodeMatrix.Entities
Imports System.Linq
Imports System.Data
Imports System.IO

Partial Class Apps_Welcome
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Try
            logName.Text = String.Format("ยินดีต้อนรับคุณ {0} เข้าสู่ระบบ GHBank System", HttpContext.Current.Session("first_name") & " " & HttpContext.Current.Session("last_name"))
        Catch ex As Exception
            GenericHelper.ShowAlert(Me, ex.Message)
        End Try

    End Sub

    Protected Sub lvDisplay_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ListViewItemEventArgs) Handles lvDisplay.ItemDataBound

        Try
            Dim img As Image = e.Item.FindControl("img_system_pic")

            If Not File.Exists(Server.MapPath(img.ImageUrl)) OrElse IsDBNull(img.ImageUrl) Then
                img.ImageUrl = "Picture/Folder.png"
            End If
        Catch ex As Exception
            GenericHelper.ShowAlert(Me, ex.Message)
        End Try

    End Sub
End Class
